package com.example.tenant.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;


import com.example.tenant.Converter.CustomStringConverter;
import com.example.tenant.Converter.LongStringConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 行政区划表
 *
 * @author waterx
 * @date 2024-02-16 21:59:02
 */
@Data
 @ColumnWidth(10)
@TableName("sys_area")
@EqualsAndHashCode(callSuper = true)
public class SysAreaEntity extends Model<SysAreaEntity> {

	/**
	 * 主键ID
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@ExcelProperty(value = "id", converter = LongStringConverter.class)
	private Long id;

	/**
	 * 父ID
	 */
	@ExcelProperty(value = "pid", converter = LongStringConverter.class)
	private Long pid;

	/**
	 * 地区名称
	 */
	@ExcelProperty("name")
	private String name;

	/**
	 * 地区字母
	 */
	@ExcelProperty("letter")
	private String letter;

	/**
	 * 高德地区code
	 */
	@ExcelProperty(value = "adcode", converter = LongStringConverter.class)
	private Long adcode;

	/**
	 * 经纬度
	 */
	@ExcelProperty("location")
	private String location;

	/**
	 * 排序值
	 */
	@ExcelProperty(value = "area_sort", converter = LongStringConverter.class)
	private Long areaSort;

	/**
	 * 0:未生效，1:生效
	 */
	@ExcelProperty("area_status")
	private String areaStatus;

	/**
	 * 0:国家,1:省,2:城市,3:区县
	 */
	@ExcelProperty("area_type")
	private String areaType;

	/**
	 * 0:非热门，1:热门
	 */
	@ExcelProperty("hot")
	private String hot;

	/**
	 * 城市编码
	 */
	@ExcelProperty(value = "city_code", converter = CustomStringConverter.class )
	private String cityCode = "";

	/**
	 * 创建人
	 */
	@ExcelProperty(value = "create_by", converter = CustomStringConverter.class )
	@TableField(fill = FieldFill.INSERT)
	private String createBy;

	/**
	 * 创建时间
	 */
	@ExcelProperty("create_time")
	@TableField(fill = FieldFill.INSERT)
	private Date createTime;

	/**
	 * 更新时间
	 */
	@TableField(fill = FieldFill.INSERT_UPDATE)
	@ExcelProperty(value = "update_by", converter = CustomStringConverter.class )
	private String updateBy;

	/**
	 * 更新时间
	 */
	@TableField(fill = FieldFill.INSERT_UPDATE)
	@ExcelProperty("update_time")
	private Date updateTime;

	/**
	 * 删除标记
	 */
	 
	@TableField(fill = FieldFill.INSERT)
	@ExcelProperty("del_flag")
	private String delFlag;

}
